package com.dognessnetwork.operation.dognecklace.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.dognessnetwork.operation.baseservice.DeviceProductService;
import com.dognessnetwork.operation.dognecklace.domain.DeviceProduct;
import com.dognessnetwork.operation.dognecklace.repository.DeviceProductRepository;

@Service
public class DeviceProductServiceImpl implements DeviceProductService {

	private @Autowired DeviceProductRepository deviceProductRepostory;
	
	@Override
	public DeviceProduct save(DeviceProduct deviceProduct) {
		DeviceProduct DeviceProduct = deviceProductRepostory.save(deviceProduct);
		return DeviceProduct;
	}

	@Override
	public void deleteById(Long id) {
		deviceProductRepostory.deleteById(id);
	}

	@Override
	public DeviceProduct findById(Long id) {
		DeviceProduct DeviceProduct = deviceProductRepostory.findById(id).get();
		return DeviceProduct;
	}

}
